﻿namespace KuiHuaBaoDian.Services.Animation {

    /// <summary>
    /// 动画剪辑名称
    /// </summary>
    public struct AnimationClipName {

        /// <summary>
        /// 哈希值,一般由<see cref="System.String.GetHashCode()"/>生成
        /// </summary>
        public int Hash;

        public override readonly bool Equals(object obj) {
            if (obj is AnimationClipName other) {
                return other.Hash == Hash;
            }
            return false;
        }

        public override readonly int GetHashCode() => Hash;

        public override readonly string ToString() => Hash.ToString();

        public static bool operator ==(AnimationClipName left, AnimationClipName right) => left.Equals(right);

        public static bool operator !=(AnimationClipName left, AnimationClipName right) => !left.Equals(right);
    }
}
